package com.qiang;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Demo07 {
    public static void main(String[] args) throws IOException {
        String s = "山西太原";
        FileWriter fw = new FileWriter("day19\\aa.txt");
        fw.write(s);
        fw.close();
        FileReader fr = new FileReader("day19\\aa.txt");
        char[] ch = new char[1024];
        int len;
        while ((len = fr.read(ch)) != -1) {
            System.out.println(new String(ch, 0, len));
        }
        fr.close();

    }
}
